package org.rcgwt.client.ui.validator.messages;

/**
 * A message object which is describe by a summary, a detail, and a severity
 * This message will be displayed in a MessageDisplay component.
 * 
 * @author Elian ORIOU
 * 
 */

public class Message implements IMessage {

	private String summary;
	private String details;
	private Severity severity;

	public Message(String s, String d, Severity sev) {
		this.summary = s;
		this.details = d;
		severity = sev;
	}

	@Override
	public String getDetails() {
		return details;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public void setSeverity(Severity severity) {
		this.severity = severity;
	}

	@Override
	public Severity getSeverity() {
		return severity;
	}

	@Override
	public String getSummary() {
		return summary;
	}

	@Override
	public String toString() {
		return "Message [details=" + details + ", severity=" + severity
				+ ", summary=" + summary + "]";
	}
}